import java.util.Locale;
import java.util.Scanner;

public class test {

    public boolean isPalindrome(String s) {
        s = s.toLowerCase();
        int left = 0;
        int right = s.length() - 1;
        while (left < right) {

            if (left < right && !isNumOrChar(s.charAt(left))) {
                left++;
            }
            if (left < right && !isNumOrChar(s.charAt((right)))) {
                right--;
            }

            if (s.charAt(left)==s.charAt(right)){
                left++;
                right--;
            }else{
                return false;
            }
        }
        return true;
    }

    private boolean isNumOrChar(char ch) {
        if (ch > '0' && ch < '9' && ch > 'a' && ch < 'z') {
            return true;
        } else {
            return false;
        }
    }

    public static void main2(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String tmp = in.nextLine();
            int index = tmp.lastIndexOf(" ");
            String str = tmp.substring(index + 1);
            System.out.println(str.length());
        }
    }


    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String tmp = in.nextLine();
            String[] ret = tmp.split(" ");
            int count = ret[ret.length - 1].length();
            System.out.println(count);
        }
    }

    /*public static void main1(String[] args) {
        long s1=999999l;
        String t1 = "123";
        long s2=long.parseLong(t1);
        System.out.println();
    }*/
}
